package org.example.ai_chat.util;

import lombok.Data;

/**
 * 做为spingBoot控制器方法的返回值类型，由SpringBoot将该对象转换为Json发送给前端
 */
@Data
public class JsonResponse {

    int code;

    @Override
    public String toString() {
        return "JsonResponse{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }

    String msg;

    Object data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
